-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add empty value
check in getRequestBodyExamples()
#904
fix: add empty value
check in getRequestBodyExamples()
#904
Conversation
packages/oas/test/operation/lib/get-requestbody-examples.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoa incredible find here 🫨 small suggestion to account for a potential edge case but overall happy with this!
packages/oas/test/operation/lib/get-requestbody-examples.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small test renaming suggestion, otherwise LGTM!
packages/oas/test/operation/lib/get-requestbody-examples.test.ts
Outdated
Show resolved
Hide resolved
still asks for changes even though changes were made
🧰 Changes
There is a weird case in our main repo where we initialize
Webhooks
with an emptyrequestBodyExamples
with the following structure:This causes
Operation.getRequestBodyExamples()
to return with an empty request example even though we should be creating an example for them. This adds an extra check so that we avoid returning the empty example and proceed to the subsequentgetRequestBodyExamples()
call that generates an example for the user.🧬 QA & Testing
Provide as much information as you can on how to test what you've done.